package ihm;

import java.util.Vector;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;

import metier.Film;
import metier.Tarif;

public class FenetreModifSupSeance extends JInternalFrame
{
	private JComboBox cbJour;
	private JLabel lblJour;
	private JComboBox cbDateSeance;
	private JLabel lblDateSeSance;
	private JPanel panel;
	private JPanel panel_1;
	private JLabel lblNumeroDeSeance;
	private JComboBox cbNumSeance;
	private JTextField txtJour;
	private JTextField txtDateSeance;
	private JLabel lblJour_1;
	private JLabel lblDateDeSeance;
	private JTextField txtNbPlacesAchetees;
	private JLabel lblNombreDePlaces;
	private JComboBox<String> lstTarif;
	private JLabel lblTarif;
	private JComboBox<String> lstFilm;
	private JLabel lblFilm;
	private JComboBox cbHoraireDebut;
	private JLabel lblHoraireDeDbut;
	private JComboBox cbSalle;
	private JLabel lblSalle;
	private JButton btnSupprimer;
	private JButton btnModifier;
	private Vector<Tarif> lesTarifs;
	private Vector<Film> lesFilms;


	public FenetreModifSupSeance(Vector<Tarif> lesTarifs, Vector<Film> lesFilms)
	{
		setBounds(100, 100, 833, 467);
		getContentPane().setLayout(null);
		
		panel = new JPanel();
		panel.setBorder(new TitledBorder(null, "s\u00E9l\u00E9ction", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(106, 27, 425, 152);
		getContentPane().add(panel);
		panel.setLayout(null);
		
		cbDateSeance = new JComboBox();
		cbDateSeance.setBounds(175, 96, 137, 22);
		panel.add(cbDateSeance);
		
		cbJour = new JComboBox();
		cbJour.setBounds(175, 61, 137, 22);
		panel.add(cbJour);
		
		lblJour = new JLabel("Jour :");
		lblJour.setBounds(112, 65, 46, 14);
		panel.add(lblJour);
		
		lblDateSeSance = new JLabel("Date se s\u00E9ance :");
		lblDateSeSance.setBounds(59, 100, 106, 14);
		panel.add(lblDateSeSance);
		
		lblNumeroDeSeance = new JLabel("numero de seance :");
		lblNumeroDeSeance.setBounds(45, 28, 115, 14);
		panel.add(lblNumeroDeSeance);
		
		cbNumSeance = new JComboBox();
		cbNumSeance.setBounds(175, 24, 137, 22);
		panel.add(cbNumSeance);
		
		panel_1 = new JPanel();
		panel_1.setBorder(new TitledBorder(null, "modification", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_1.setBounds(106, 190, 587, 183);
		getContentPane().add(panel_1);
		panel_1.setLayout(null);
		
		this.lesTarifs = lesTarifs;
		this.lesFilms = lesFilms;
		
		lstTarif = new JComboBox <String>();
		for(Tarif t: lesTarifs)
		{
			lstTarif.addItem(t.getLibTarif());
		}
		lstTarif.setBounds(370, 39, 194, 22);
		panel_1.add(lstTarif);
		
		lstFilm = new JComboBox <String>();
		for(Film f: lesFilms)
		{
			lstFilm.addItem(f.getTitreFilm());
		}
		lstFilm.setBounds(369, 72, 195, 20);
		panel_1.add(lstFilm);
		
		
		txtJour = new JTextField();
		txtJour.setBounds(171, 39, 86, 20);
		panel_1.add(txtJour);
		txtJour.setColumns(10);
		
		txtDateSeance = new JTextField();
		txtDateSeance.setBounds(171, 70, 86, 20);
		panel_1.add(txtDateSeance);
		txtDateSeance.setColumns(10);
		
		lblJour_1 = new JLabel("jour :");
		lblJour_1.setBounds(119, 42, 46, 14);
		panel_1.add(lblJour_1);
		
		lblDateDeSeance = new JLabel("date de seance :");
		lblDateDeSeance.setBounds(66, 73, 95, 14);
		panel_1.add(lblDateDeSeance);
		
		txtNbPlacesAchetees = new JTextField();
		txtNbPlacesAchetees.setBounds(171, 101, 86, 20);
		panel_1.add(txtNbPlacesAchetees);
		txtNbPlacesAchetees.setColumns(10);
		
		lblNombreDePlaces = new JLabel("Nombre de places achet\u00E9es :");
		lblNombreDePlaces.setBounds(10, 104, 151, 14);
		panel_1.add(lblNombreDePlaces);
		
		lblTarif = new JLabel("tarif :");
		lblTarif.setBounds(328, 44, 46, 14);
		panel_1.add(lblTarif);
		
		lblFilm = new JLabel("film :");
		lblFilm.setBounds(328, 75, 46, 14);
		panel_1.add(lblFilm);
		
		cbHoraireDebut = new JComboBox();
		cbHoraireDebut.setBounds(370, 103, 194, 20);
		panel_1.add(cbHoraireDebut);
		
		lblHoraireDeDbut = new JLabel("horaire de d\u00E9but :");
		lblHoraireDeDbut.setBounds(267, 106, 92, 14);
		panel_1.add(lblHoraireDeDbut);
		
		cbSalle = new JComboBox();
		cbSalle.setBounds(370, 137, 194, 20);
		panel_1.add(cbSalle);
		
		lblSalle = new JLabel("salle :");
		lblSalle.setBounds(328, 140, 46, 14);
		panel_1.add(lblSalle);
		
		btnSupprimer = new JButton("Supprimer");
		btnSupprimer.setBounds(21, 384, 130, 23);
		getContentPane().add(btnSupprimer);
		
		btnModifier = new JButton("Modifier");
		btnModifier.setBounds(662, 384, 130, 23);
		getContentPane().add(btnModifier);

	}

}
